<?php 
/********************************
 *
 * 
 *
 * 
 */
$project_id = Request::current()->param('project_id');
 $milestones1 = array(
 	0 => array(
 		'id'			=> 1,
 		'date_create' 	=> '2011-11-29',
 		'name'		  	=> 'Test 1',
 		'status'		=> Helper_MyConst::STATUS_COMPLETE,
 	),
 	1 => array(
 		'id'			=> 2,
 		'date_create' 	=> '2011-12-02',
 		'name'		  	=> 'Test 2',
 		'status'		=> Helper_MyConst::STATUS_IN_PROGRESS,
 	),
 	2 => array(
 		'id'			=> 3,
 		'date_create' 	=> '2011-12-03',
 		'name'		  	=> 'Test 3',
 		'status'		=> Helper_MyConst::STATUS_IN_PROGRESS,
 	),
 );
 
 $next_milestones = array(
 	0 => array(
 		'date_create' 	=> '2011-12-19',
 		'name'		  	=> 'Test 1',
 		'status'		=> Helper_MyConst::STATUS_COMPLETE,
 	),
 	1 => array(
 		'date_create' 	=> '2011-12-22',
 		'name'		  	=> 'Test 2',
 		'status'		=> Helper_MyConst::STATUS_IN_PROGRESS,
 	),
 	2 => array(
 		'date_create' 	=> '2011-12-23',
 		'name'		  	=> 'Test 3',
 		'status'		=> Helper_MyConst::STATUS_IN_PROGRESS,
 	),
 );	
?>
<div class="calendar">
	<h2 class="calendar">
		<div class="controller">
			<a href="#" onClick="make_calendar(event,0,1);"class="pre">pre</a>
			<input type="hidden" class="pre-day" name="pre_day" value="">
				2 weeks
			<a href="#" onClick="make_calendar(event,2,1);" class="next">next</a>
			<input type="hidden" class="next-day" name="next_day" value="">
		</div>
	</h2>
	
	<table class="header">
		<tbody>
			<tr>
				<td>Sunday
				</td>
				<td>Monday
				</td>
				<td>Tuesday
				</td>
				<td>Wednesday
				</td>
				<td>Thursday
				</td>
				<td>Friday
				</td>
				<td>Saturday
				</td>
			</tr>
		</tbody>
	</table>
	<div class="calendar-content">
		<table>
			<tbody>
				<tr>
					<td class="today">
					<div class="menu-balloon-container">
						<div class="balloon" style="left:-120px; top:13px; display: block;">
							<div class="balloon-wrapper">
								<div class="balloon-pointer">
			                      <div class="balloon-arrow"></div>
			                      <div class="balloon-arrow-border"></div>
			                    </div>
								<div class="balloon-content">
									<div class="part">
										<label>Title :</label>
										<input type="text" name="" value="">
									</div>
									<div class="part">
										<label>Project :</label>
										<select name="" value="">
											<option>asdb</option>
										</select>
									</div>
									<div class="part">
										<label>Deadline :</label>
										<input type="text" class="deadline" name="" value=""> at 
										<input type="text" class="time" name="" value="">
									</div>
									<div class="part">
										<label>Owner :</label>
										<input type="text" name="" value="">
									</div>
									<div class="part final">
										<button class="cancel left">Cancel</button>
										<button class="save left">Save</button>	
									</div>
								</div>
							</div>
						</div>
					</div>
					
					<div class="date"><span>1</span></div>
					<div class="element"><input type="checkbox" value="" name=""> Hoan thanh co ban cho nhiu thu</div>
					<div class="element"><input type="checkbox" value="" name=""> Hoan thanh co ban cho nhiu thu</div>
					<div class="element done"><input type="checkbox" value="" name=""><a href="#">Hoan thanh co ban cho nhiu thu</a></div>
					</td>
					<td>asdasd
					</td>
					<td>asdasdas
					</td>
					<td>asdasdas
					</td>
					<td>asdasdasd
					</td>
					<td>asdasdasd
					</td>
					<td>asdasdasd
					</td>
				</tr>
			</tbody>
		</table>
		<table>
			<tbody>
				<tr>
					<td>asdasd
					</td>
					<td>asdasd
					</td>
					<td>asdasdas
					</td>
					<td>asdasdas
					</td>
					<td>asdasdasd
					</td>
					<td>asdasdasd
					</td>
					<td><div class="element done"><input type="checkbox" value="" name=""><a href="#">Hoan thanh co ban cho nhiu thu</a></div>
					</td>
				</tr>
			</tbody>
		</table>
		<table>
			<tbody>
				<tr>
					<td>asdasd
					</td>
					<td>asdasd
					</td>
					<td>asdasdas
					</td>
					<td>asdasdas
					</td>
					<td>asdasdasd
					</td>
					<td>asdasdasd
					</td>
					<td>asdasdasd
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</div>
<script type="text/javascript">
	var milestone = $.parseJSON('<?php echo addslashes(json_encode($milestones))?>');
	var users = $.parseJSON('<?php echo addslashes(json_encode($users))?>');
	var project_id = <?php echo $project_id?>;
	console.log(milestone);
	render_calendar(milestone);
	//console.log(test);
</script>